package day5.zy1;

import java.io.*;
import java.util.*;

public class Test {
    public static void main(String[] args) throws IOException {
        FileInputStream file =null;
        BufferedReader br =null;
        String a =null;
            InputStreamReader in =new InputStreamReader(new FileInputStream("E:\\QQ\\水浒传.txt"),"GBK");
            br =new BufferedReader(in);
            System.out.println("请输入名字:");
            Scanner input =new Scanner(System.in);
            String s =input.next();
            while((a=br.readLine())!=null){
                if ((a.indexOf(s))>0){
                    System.out.println(a.substring(4,11));
                }
            }
            br.close();
            file.close();
    }
}
